<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>首页</title>
		<link rel="stylesheet" href="http://192.168.6.18/arcgis_js_api/library/3.17/3.17/esri/css/esri.css">
	</head>

	<body class="tundra">
		<script>
			var href = window.document.location.href;
			var index = href.lastIndexOf("/js/") + 3;
			var jsPath =href.substring(0,index);
				var dojoConfig = {
					async: true,
					labsPath:"/ylly-forestry-resources-webapp/assets/libs",
					packages: [{
						name: "widget",
						location: jsPath+"/widget"
					},
					{
						name: "project",
						location: jsPath+"/project"
					}
					]
				};
		</script>
		<script src="http://192.168.6.18/arcgis_js_api/library/3.17/3.17/init.js"></script>
		<script>
			require(["widget/task/QueryTask"],
				function(QueryTask) {
					var queryTask = new QueryTask({
						fields: [{
							name: "XIAN",
							value: "610802"
						}/*, {
							name: "XIANG",
							value: "001"
						}, {
							name: "CUN",
							value: "013"
						}*/],
						returnGeometry: true,
						url: "http://192.168.6.18/arcgis/rest/services/ylly/yuyangxiaoban_cache/MapServer/0"
					});
					queryTask.executeForIds().then(function(res) {
						console.log(res);
						queryTask.executebyObjectIds([1,2,3]).then(function(res) {
							console.log(res)
						});
					});
					
				});
		</script>
	</body>

</html>